import React from 'react';
import { connect } from 'dva';
import styles from './countApp.less';

function CountApp({ count , dispatch }){
	return (
		<div className={styles.normal}>
			<div className={styles.record}>最快点击速度为：{ count.record }</div>	
			<div className={styles.current}> {count.current} </div>
			<div className={styles.button}>
				<button onClick={()=>{dispatch({type:'count/add'})}}>点击</button>
			</div>
		</div>
		)
}
function mapStateToProps(state){
	return { count : state.count }
}
export default connect(mapStateToProps)(CountApp);